let list = [
  {
    label: '飞廉',
    default: '/start',
    list: [
      {
        name: '快速开始',
        routerName: '',
        groups: [{
          list: [{
            title: '序言',
            path: '/start'
          }, {
            title: '简介',
            path: '/summary'
          }, {
            title: '开发环境',
            path: '/tools'
          }, {
            title: '运行项目',
            path: '/install'
          }]
        }]
      },
      {
        name: '开发初探',
        routerName: '',
        groups: [{
          list: [
            {
              title: '代码结构',
              path: '/code'
            },
            {
              title: '创建一个模块',
              path: '/createModule'
            },
            {
              title: '编写java端代码',
              path: '/createJavaCode'
            },
            {
              title: '编写页面代码',
              path: '/createWebView'
            },
            {
              title: '权限控制',
              path: '/permission'
            },
            {
              title: '开放API接口',
              path: '/createJson'
            }

          ]
        }]
      },
      {
        name: '开发进阶',
        routerName: '',
        groups: [{
          list: [
            {
              title: '数据转换',
              path: '/dataConvert'
            },
            {
              title: '日志系统',
              path: '/log'
            },
            {
              title: 'redis配置',
              path: '/redis'
            },
            {
              title: '数据库加密',
              path: '/database'
            },
            {
              title: '切换配置文件',
              path: '/springProfile'
            },
            {
              title: '打包',
              path: '/package'
            }
          ]
        }]
      },
      {
        name: '功能特性',
        routerName: '',
        groups: [{
          list: [
            {
              title: '定时任务',
              path: '/schedule'
            },
            {
              title: '多租户',
              path: '/tenant'
            },
            {
              title: '数据规则',
              path: '/dataRule'
            },
            {
              title: '电子邮件',
              path: '/email'
            },
            // {
            //   title: '短信',
            //   path: '/sms'
            // },
            {
              title: '云存储OSS',
              path: '/oss'
            }
          ]
        }]
      }
    ]
  },
  {
    label: '文鳐',
    default: '/wenyao/start',
    list: [
      {
        name: '快速开始',
        routerName: '',
        groups: [{
          list: [{
            title: '序言',
            path: '/wenyao/start'
          }, {
            title: '简介',
            path: '/wenyao/summary'
          }, {
            title: '开发环境',
            path: '/wenyao/tools'
          }, {
            title: '运行项目',
            path: '/wenyao/install'
          }]
        }]
      },
      {
        name: '开发初探',
        routerName: '',
        groups: [{
          list: [
            {
              title: '代码结构',
              path: '/wenyao/code'
            },
            {
              title: '创建一个模块',
              path: '/wenyao/createModule'
            },
            {
              title: '编写代码',
              path: '/wenyao/createWebView'
            },
            {
              title: '配置路由',
              path: '/wenyao/router'
            },
            {
              title: '打包',
              path: '/wenyao/package'
            }
          ]
        }]
      },
      {
        name: '开发进阶',
        routerName: '',
        groups: [{
          list: [
            {
              title: '路由守卫配置',
              path: '/wenyao/routerGuard'
            },
            {
              title: '过滤器使用',
              path: '/wenyao/filters'
            },
            {
              title: '自定义主题样式',
              path: '/wenyao/theme'
            },
            {
              title: '表单校验',
              path: '/wenyao/formValidate'
            },
            {
              title: 'SVG图标',
              path: '/wenyao/svg'
            }
          ]
        }]
      }
    ]
  },
  {
    label: '仓颉',
    default: '/cangjie/start',
    list: [
      {
        name: '单表建模',
        routerName: '',
        groups: [{
          list: [{
            title: '序言',
            path: '/cangjie/start'
          },{
            title: '特色功能',
            path: '/cangjie/summary'
          }, {
            title: '创建数据连接',
            path: '/cangjie/database'
          }, {
            title: '创建数据表',
            path: '/cangjie/tableSetting'
          }, {
            title: '模型配置',
            path: '/cangjie/model'
          }, {
            title: '多表联查',
            path: '/cangjie/tableJoin'
          }, {
            title: '生成代码',
            path: '/cangjie/genCode'
          }, {
            title: '树表配置',
            path: '/cangjie/createTreeTable'
          }]
        }]
      },
      {
        name: '多表建模',
        routerName: '',
        groups: [{
          list: [{
            title: '二级级联表',
            path: '/cangjie/associateTable'
          }, {
            title: '左树右表',
            path: '/cangjie/treeAndTable'
          }]
        }]
      }
    ]
  }
  ]


export default (function () {
  function detail(nav, count) {
    nav.forEach(ele => {
      const children = ele.list || ele.groups
      ele.count = count
      if (children) detail(children, count)
    })
  }

  list.forEach((ele, index) => {
    const children = ele.list
    ele.count = index
    if (children) detail(children, index)
  })
  return list
})()
